Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends edn-renderer to support richer renderer/relay workflows (multi-channel selection + renderer-provided help/skill/status) and adds ECharts-based chart rendering, alongside updated operational documentation and an RFC capturing Mermaid stability learnings.
Changes:
- Add ECharts dependency and implement chart rendering via a Respo effect, plus global resize handling.
- Introduce multi-channel UI/relay handshake changes and renderer ops (
help/skill/status) served via protocolack. - Add/expand documentation (Skill guide, components reference, Mermaid stability RFC) and update dev workflow notes.
Reviewed changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks new echarts (and transitive) dependencies. |
| package.json | Adds echarts dependency. |
| .pnp.cjs | Updates Yarn PnP dependency map for echarts. |
| main.mjs | Replaces Mermaid bootstrap with ECharts resize handling + app entry. |
| deps.cirru | Adds Respo/alerts.calcit dependency. |
| calcit.cirru | Implements multi-channel selection, renderer ops responses, Mermaid/ECharts effects, and updated UI. |
| COMPONENTS.md | Expands component DSL documentation (includes chart/mermaid sections). |
| SKILL.md | New reusable workflow/skill manual for edn-relay + edn-renderer. |
| RFCs/2026-05-mermaid-rendering-stability.md | New accepted RFC documenting Mermaid rendering stability diagnosis/decisions. |
| Agents.md | Updates dev workflow notes and adds Mermaid/Calcit pitfalls guidance. |
| .gitignore | Ignores artifacts/*. |
Files not reviewed (1)
- .pnp.cjs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+592
to
+616
| if (nil? output) (.!warn js/console "|[mermaid] missing .mermaid-output" el) | ||
| if | ||
| some? $ get @*rendered-svgs source | ||
| .!debug js/console "|[mermaid] skip rendered" | ||
| do | ||
| reset! *rendered-svgs $ assoc @*rendered-svgs source :rendering | ||
| ensure-mermaid! | ||
| let | ||
| render-fn $ .-render mermaid-lib | ||
| try | ||
| let | ||
| result $ js-await (.!call render-fn mermaid-lib graph-id source) | ||
| svg $ .-svg result | ||
| bind-fns $ .-bindFunctions result | ||
| do | ||
| set! (.-innerHTML output) svg | ||
| when (some? bind-fns) (bind-fns output) | ||
| reset! *rendered-svgs $ assoc @*rendered-svgs source svg | ||
| .!debug js/console "|[mermaid] render" $ js-object | ||
| :length $ count source | ||
| :graphId graph-id | ||
| fn (error) | ||
| do | ||
| reset! *rendered-svgs $ assoc @*rendered-svgs source false | ||
| .!error js/console "|[mermaid] render failed" error |
Comment on lines
+68
to
+76
| defn build-mermaid-render-payload (text) | ||
| let | ||
| source $ if (string? text) text | | ||
| trimmed $ trim source | ||
| if (= trimmed |) | ||
| {} (:empty? true) (:source |) (:graph-id |) | ||
| {} (:empty? false) (:source source) | ||
| :graph-id $ str |mermaid- (count source) |- | ||
| count $ split-lines source |
Comment on lines
+455
to
+466
| do (.!debug js/console "|[echarts] render/raw" option) (.!log js/console "|[echarts] render/plain" plain-option) | ||
| .!log js/console "|[echarts] render/plain-json" $ js/JSON.stringify plain-option nil 2 | ||
| .!log js/console "|[echarts] host-size" (.-clientWidth el) (.-clientHeight el) | ||
| .!setOption chart plain-option true | ||
| dispose-chart $ fn () | ||
| let | ||
| chart $ echarts-lib/getInstanceByDom el | ||
| when (some? chart) (.!dispose chart) | ||
| case-default action nil | ||
| :mount $ do (.!debug js/console "|[echarts] mount") (render-chart) | ||
| :update $ do (.!debug js/console "|[echarts] update") (render-chart) | ||
| :unmount $ do (.!debug js/console "|[echarts] unmount") (dispose-chart) |
Comment on lines
+214
to
+217
| `comp-chart-block` 将图表配置(kind、title、series)序列化为 Cirru EDN 格式,存储在 DOM 节点的 `title` 属性中。`main.mjs` 通过 `MutationObserver` 监听 `.echarts-host` 节点的插入,解析数据后调用 `echarts.setOption()` 渲染。 | ||
|
|
||
| 这与 Mermaid 图表的渲染方式相同,保持了一致的「Calcit 写入属性 → JS 读取渲染」的分工模式。 | ||
|
|
- caps upgrade --all: calcit-version 0.12.35 -> 0.12.49
- Add :features #{} :js-ffi to 10 defs using JS FFI
- Remaining 23 warnings from respo-alerts.calcit (external)
- caps upgrade --all picks up respo-alerts.calcit 0.10.13 (with :js-ffi) - Add missing :js-ffi to app.main/main! - Now 0 warnings 🎉
- Rename 2026-05 -> 2026-05-26 based on git history (first commit date) - Add RFC: edn-renderer 的表单状态、事件与数据转换
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.